Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2BundleManager = require("BundleManager");
var $2Gold = require("Gold");
var def_GoldManager = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
    this.itemPoolSize = 50;
    this.itemPool = new cc.NodePool();
  }
  babel_createClass(_ctor, [{
    key: "init",
    value: function init() {
      for (var _e28 = 0; _e28 < this.itemPoolSize; _e28++) {
        var _e29 = cc.instantiate($2BundleManager.default.instance.getBundleRes("Prefab", "Object/Gold"));
        this.itemPool.put(cc.instantiate(_e29));
      }
    }
  }, {
    key: "getItem",
    value: function getItem(e, t, a, _s2) {
      var o = null;
      (o = this.itemPool.size() > 0 ? this.itemPool.get() : cc.instantiate($2BundleManager.default.instance.getBundleRes("Prefab", "Object/Gold"))).getComponent($2Gold.default).init(e, t, a, _s2);
      return o;
    }
  }, {
    key: "putItem",
    value: function putItem(e) {
      this.itemPool.put(e);
    }
  }], [{
    key: "instance",
    get() {
      _ctor._instance || (_ctor._instance = new _ctor());
      return _ctor._instance;
    }
  }]);
  return _ctor;
}();
exports.default = def_GoldManager;
def_GoldManager._instance = null;